from strutils import format

template throw*(T: typedesc, fmt: string, args: varargs[string, `$`]) =
    ## raise exception, with formatted message
    raise T.new_exception format(fmt, args)

